# Add wage into RRC_county_emp_tx.txt. 


BEGIN {
  FS = ","
  OFS = ","
  while ((getline line < "/home/huizi/HOLA/research/green-jobs/data/raw/tx_wind_mon.csv") > 0) {
    split (line, x)
    county = x[1]
    year = x[2]
    month = x[3]
    wcap[county,year,month] = x[7]
  }
}

{
  if ($1 SUBSEP $2 SUBSEP $3 in wcap)
    print $0, wcap[$1,$2,$3]
  else {
    print NR, $2, "Error"
    exit
  }
}
